From e4ae918a5a1840e1c2d59636bdb8db51cab050b3 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Fri, 3 Mar 2006 10:11:33 -0700 Subject: [PATCH] [IA64] Avoid double reclaim dom0 image and dom0 initrd VMM doesn't need to reclaim dom0 image and dom0 initrd by using init_domheap_pages, because they have been reclaimed by below code: in function start_kernel of xensetup.c efi_memmap_walk(filter_rsvd_memory, init_boot_pages); Reclaiming again may cause xen hang at very beginning. BTW, dom0 initrd is for dom0 not for xen, it will be copied into dom0 memory space, so VMM doesn't need to reserve memory for dom0 initrd. Commenting below definition makes dom0 initrd reclaimable. -#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0 +//#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0 Signed-off-by: Anthony Xu --- xen/arch/ia64/xen/xensetup.c | 29 ----------------------------- xen/include/asm-ia64/config.h | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/xen/arch/ia64/xen/xensetup.c b/xen/arch/ia64/xen/xensetup.c index 8b6faeed26..924d98e2ca 100644 --- a/xen/arch/ia64/xen/xensetup.c +++ b/xen/arch/ia64/xen/xensetup.c @@ -155,24 +155,6 @@ struct ns16550_defaults ns16550_com2 = { .parity = 'n', .stop_bits = 1 }; -/* This is a wrapper function of init_domheap_pages, - * memory exceeds (max_page<vcpu[0]->cpu_affinity = cpumask_of_cpu(0); - /* The stash space for the initial kernel image can now be freed up. */ - /* init_domheap_pages_wrapper is temporary solution, please refer to the - * descriptor of this function */ - init_domheap_pages_wrapper(ia64_boot_param->domain_start, - ia64_boot_param->domain_start+ia64_boot_param->domain_size); - /* throw away initrd area passed from elilo */ - if (ia64_boot_param->initrd_size) { - init_domheap_pages_wrapper(ia64_boot_param->initrd_start, - ia64_boot_param->initrd_start+ia64_boot_param->initrd_size); - } - if (!running_on_sim) // slow on ski and pages are pre-initialized to zero scrub_heap_pages(); diff --git a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h index fd7bad3e7c..9e2c9c93c5 100644 --- a/xen/include/asm-ia64/config.h +++ b/xen/include/asm-ia64/config.h @@ -249,7 +249,7 @@ extern unsigned long loops_per_jiffy; extern char saved_command_line[]; struct screen_info { }; #define seq_printf(a,b...) printf(b) -#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0 +//#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0 void dummy_called(char *function); #define dummy() dummy_called((char *) __FUNCTION__) -- 2.30.2